package com.bcxj.serviceorder.client;

import com.bcxj.internalcommon.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * ClassName: ServicePriceClient
 * Package: com.bcxj.serviceorder.client
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/11/11 23:11
 * @Version 1.0
 * @Since 1.0
 */
@FeignClient("service-price")
public interface ServicePriceClient {

    @GetMapping("/price-rule/is-new")
    ResponseResult<Boolean> isNew(@RequestParam String fareType, @RequestParam Integer fareVersion);

    @GetMapping("/price-rule/if-exists")
    public ResponseResult<Boolean> ifExists(@RequestParam String address, @RequestParam String vehicleType);

    @PostMapping("calculate-price")
    public ResponseResult<Double> calculatePrice(@RequestParam String distance,
                                                 @RequestParam String duration,
                                                 @RequestParam String fareType,
                                                 @RequestParam String fareVersion);
}
